window.onDomReady (function () {
	
	// Variables de Drags y Drops
	var $drags = $$('#drags div');

	// Creamos objeto tipo Drag and Drop Basico
	var miDxD = new DxD.Swap ($drags, [], {
		container: $('content'),
		dragDelete: true,
		sendToBack: 'ini',
		cssClass: 'miDxD',
		init: {
			randomDrags: true
		}
	});

	//miDxD.options.adjDrags.randomize();
	
	var arrOrdDrags = new Array ();
	var wordOfDrags;

	miDxD.addEvent ('dragComplete', function (drag, drags) {
		wordOfDrags = '';
		var $arrPosDrags = new Array ();
		for (var $i = 0; $i < this.drags.length; $i++) $arrPosDrags[this.drags[$i].order] = $i;

		this.drags.each(function ($drag, $iD){
			wordOfDrags = wordOfDrags + this.drags[$arrPosDrags[$iD]].getText();
		}.bind(this));

		if (wordOfDrags == 'mootools') alert ('ok !!!');
	});
	
});